package com.demo.model;

import com.alibaba.fastjson.JSONObject;
import com.wordnik.swagger.annotations.ApiModel;

@ApiModel
public class RestfulResult {
	private boolean success;
	private String message;
	private Object data;

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public RestfulResult() {
		super();
	}

	public RestfulResult(boolean success, String message) {
		super();
		this.success = success;
		this.message = message;
	}

	public RestfulResult(boolean success, String message, Object data) {
		super();
		this.success = success;
		this.message = message;
		this.data = data;
	}

	@Override
	public String toString() {
		return JSONObject.toJSONString(this);
	}
}
